<?php
	require_once(realpath(dirname(__FILE__)) . "/Baseobj.class.php");
	
	class Raisondesc extends Baseobj{

		var $id;
		var $raison;
		var $lang;
		var $court;
		var $long;

		const TABLE="raisondesc";
		var $table=self::TABLE;

		var $bddvars = array("id", "raison", "lang", "court", "long");

		function __construct($raison = 0, $lang = 1){
			parent::__construct();

			if($raison > 0)
 			  $this->charger($raison, $lang);
		}

		function charger($raison, $lang=1){
			return $this->getVars("select * from $this->table where raison=\"$raison\" and lang=\"$lang\"");
		}

		function charger_id($id){
		     return $this->getVars("select * from $this->table where id=\"$id\"");
		}

	}
?>